]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
test-tool: Require script argument
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 7 Jul 2023 13:36:18 +0000 (15:36 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Fri, 7 Jul 2023 17:43:28 +0000 (19:43 +0200)
The purpose of the tool has shifted from running a limited set
of performance tests repeatedly to collect performance data
and catch regressions, to a wrapper that drives gnome-shell via
scripts for tests.

With that, the concept of a "default" script doesn't really make
sense anymore.

Instead, turn the argument from an optional flag into a required
parameter. This will allow us to stop bundling the existing tests
in a follow-up commit.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2812>

src/gnome-shell-test-tool.in
tests/meson.build

index 3911df8ffc6b8a222fc121fdcba9e6ca9a4e47d9..536409348def95c8f3827a633af63360f00b0088 100755 (executable)
@@ -288,8 +288,9 @@ def run_performance_test(wrap=None):
 # Main program
 
 parser = argparse.ArgumentParser()
-parser.add_argument("--script",
-                    help="Specify the path to the automation script to run")
+parser.add_argument("script",
+                    metavar="AUTOMATION_SCRIPT",
+                    help="Automation script to run")
 parser.add_argument("--test-iters", type=int, metavar="ITERS",
                     help="Numbers of iterations of the test to run",
                     default=1)
@@ -323,12 +324,6 @@ parser.add_argument("--hotplug", action="store_true",
 
 options = parser.parse_args()
 
-if options.script == None:
-    if options.hwtest:
-        options.script = 'resource:///org/gnome/shell/perf/hwtest.js'
-    else:
-        options.script = 'resource:///org/gnome/shell/perf/core.js'
-
 if options.extra_filter is None:
     options.extra_filter = []
 
index f2ccf0aa79ca19e7e00a261ab59cc84464c9cbc1..49cc3b1c2c1af0534c72463033c6b6ff774b9b07 100644 (file)
@@ -71,8 +71,8 @@ foreach shell_test : shell_tests
     args: [
       test_tool,
       '--headless',
-      '--script=@0@/js/perf/@1@.js'.format(meson.project_source_root(), test_name),
       options,
+      '@0@/js/perf/@1@.js'.format(meson.project_source_root(), test_name),
     ],
     is_parallel: false,
     env: shell_testenv,